package com.enums;

/**
 * @Author xc
 * @Description 系统响应码定义
 * @Date 2022/2/25 10:04
 **/
public enum RespCodeEnums {

	/*  **自定义返回码必须以  999   开头** **/

	/**001-100  基础**/
	SUCCESS_CODE(0, "成功"),
	SUCCESS_RESPCODE(999002, "成功"),
	FAILED_CODE(1, "失败"),
	FAILED_RESPCODE(999001, "失败"),

	/**101-200  权限 **/
	TOKEN_ERROR(999101, "token失效,重新登陆"),
	NO_PRIVILEGES_ERROR(999102, "没有权限"),
	ACCOUNT_INFO_ERROR(999103, "用户名或密码错误"),
	ACCOUNT_INFO_DEFECT_ERROR(999104, "账号资料不全"),
	UNREGISTERED_ERROR(999105, "账号无效"),
	SIGN_NO_NULL(999106, "签名不能为空"),
	PASS_ERROR(999107, "加解密失败"),
	PARAM_SPLICING_ERROR(999108, "验签参数拼接不合法"),
	TIME_ERROR(999109, "不是有效的请求，请求检查设备时间"),
	SYSCODE_ERROR(999110, "该机构不在请求名单内"),
	SERVICE_KEY_NO_NULL(999111, "服务Key不能为空"),
	SIGN_ERROR(999112, "签名失效"),
	USER_BLACK_LIST(999114, "账号已被监控，请稍后再试"),
	USER_NO_PATIEN_LIST(999115, "请求的患者ID不在该用户体系下"),
	IP_WHITE_ERROR(999116, "IP限制"),

	/**201-  业务 **/
	NET_ERROR(999201, "资源不存在"),
	DATA_ERROR(999202, "数据库数据同步失败"),
	PAY_PRE_ERROR(999203, "支付前置操作失败"),
	PAY_RECORD_ERROR(999204, "支付订单不存在"),
	REFUND_AMOUNT_ERROR(999205, "退款金额错误"),
	NOTIFY_ERROR(999206, "支付通知失败"),
	REFUND_EXISTING_ERROR(999207, "重复提交退款"),
	BUSINESS_COLLECT_EXIST(999208, "收藏信息已存在"),
	PARAM_NO_NULL(999209, "参数不能为空"),
	HOS_RESPONSE_NULL(999210, "院内未返回结果"),
	THIRD_INTERFACE_ERROR(999211, "请求第三方接口异常"),
	ADDRESS_ERROR(999212, "地址详情包含特殊字符、空格"),
	REMARK_ERROR(999213, "备注消息包含特殊字符或者特殊标点"),
	OPERATION_ERROR(999214, "请稍等，程序正在处理！"),
	AGREEMENT_NO(999215, "查无此协议"),
	POST_BODY_NO_NULL(999216, "post请求body不能空"),
	UPLOAD_ERROR(999217, "上传失败"),
	SAVE_DATA_FAIL(999217, "保存数据失败"),
	QUERY_DATA_NULL(999218, "获取数据为空"),
	HIS_RESP_FAIL(999219, "请求集成端接口返回失败"),
	ZZJ_ORDER_NO_ERROR(999220, "自助机平台订单号不存在"),

	/**网络异常 **/
	NET_FAILED(999999, "网络异常"),

	/*501-  外部对接 **/
	/** 杭创需调用注销接口 **/
	NEED_DELETE_USER(999503, "杭创需调用注销接口");

    public final int code;
	public final String msg;

	RespCodeEnums(int code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public int getCode() {
		return code;
	}

	public String getMsg() {
		return msg;
	}

}
